Rather than require config changes if you aren't using eth0, use the
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Fri, 10 Feb 2006 01:03:24 +0000 (02:03 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Fri, 10 Feb 2006 01:03:24 +0000 (02:03 +0100)
default network device available no matter the name. It can still
be configured if you want a specific network device.

Patch by Bill Nottingham <notting@redhat.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/network-bridge
tools/examples/xend-config.sxp

index ce383be86d04ff34788e08a2ca06c79a8669c7f3..3c5b0447012f3303adfb336c63a701b24c145084 100755 (executable)
@@ -61,6 +61,7 @@ evalVariables "$@"
 
 vifnum=${vifnum:-0}
 bridge=${bridge:-xenbr${vifnum}}
+netdev=${netdev:-$(ip route list default scope global| awk '{ print $NF }')}
 netdev=${netdev:-eth${vifnum}}
 antispoof=${antispoof:-no}
 
index dedb2de160a83fc3ac914d08a1e25bf812020d21..f9ed5642d5a533bdf27c8b95c57b0ef2755e1a01 100644 (file)
@@ -70,8 +70,8 @@
 #
 # (network-script network-bridge)
 #
-# Your eth0 is used as the outgoing interface, by default.  To use a different
-# one (e.g. eth1) use
+# Your default ethernet device is used as the outgoing interface, by default. 
+# To use a different one (e.g. eth1) use
 #
 # (network-script 'network-bridge netdev=eth1')
 #